package com.globo.devsup.client;

import com.globo.devsup.client.presenter.PrincipalPresenter;
import com.globo.devsup.client.view.PrincipalView;
import com.google.gwt.core.client.EntryPoint;
import com.gwtext.client.widgets.Panel;
import com.gwtext.client.widgets.Viewport;
import com.gwtext.client.widgets.layout.FitLayout;

public class Principal implements EntryPoint {

	private final PrincipalView principalView = (PrincipalView) new PrincipalPresenter().pack();
	
	public void onModuleLoad() {
		Panel rootPanel = new Panel();   
        rootPanel.setBorder(false);   
        rootPanel.setPaddings(10);   
        rootPanel.setLayout(new FitLayout());
        rootPanel.setMaskDisabled(false);
        
        rootPanel.add(principalView);
        new Viewport(rootPanel);
        principalView.getEl().mask();
        
		/*
		
		login.login.addListener(new ButtonListenerAdapter() {  
			public void onClick(Button button, EventObject e) {  
				LoginRPCAsync loginrpc = (LoginRPCAsync) GWT.create(LoginRPC.class);
				loginrpc.validate(login.userName.getValueAsString(), login.pass.getValueAsString(), login.globoNet.getValueAsString(), callback);
				principalPanel.getEl().unmask();
				login.close();
			}
		});*/
	}

}
